<?php
$url = $this->getConfigValue('server_url');// 返回首页
$oppteam_name = $data['oppteam_name'];
$appid = $data['appid'];
$signature_url = $data['signature_url'];
$url = $data['server_url'];
$wx_name = $data['wx_name'];
$resultArr = array("fail","win","equal");
$teamInfo  = $data['team_info'];
$total = $data['total'];
$teamScore = $data['team_score'];
$result = $data['win'];
?>
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>游戏结果</title>
	<meta name="viewport" content="initial-scale=0.5, maximum-scale=0.5, user-scalable=no, width=device-width">
	<meta content="black" name="apple-mobile-web-app-status-bar-style" />
	<meta content="telephone=no" name="format-detection" />
	<link rel="stylesheet" href="/css/mobile/mobile-base.css" />
	<link rel="stylesheet" href="/css/mobile/common.css" />
	<link rel="stylesheet" href="/css/mobile/result.css" />
</head>
<body>
<?php if($result == 0) { ?>
	<div class="fail-line bgimg"></div>
<?php } ?>
<div class="container center middle bgimg <?php if($result == 1) echo "halo"; ?>">
	<section class="Part">
		<div class="pageTit bgimg"></div>
		<div class="pageBody">
			<div class="square">
				<div class="teamImg-group <?php if($teamInfo['type']==2) echo ' blue'; ?>">
					<div class="border-modA">
						<img src="<?php echo $teamInfo['team_image']; ?>" class="team-img responseImg" alt="" title="" />
					</div>
					<span class="arrow arrow-t"></span>
					<span class="arrow arrow-r"></span>
					<span class="arrow arrow-b"></span>
					<span class="arrow arrow-l"></span>
				</div>
				<div class="team-name textset"><?php echo $teamInfo['team_name']; ?></div>
				<div class="clearfix pr tc detail">
					<div class="fl">
						<p>团队力量</p>
						<p  class="num"><?php echo $teamScore; ?></p>
					</div>
					<div class="line"></div>
					<div class="fl">
						<p>你贡献了</p>
						<p  class="num"><?php echo $total; ?></p>
					</div>
				</div>
				<div class="match-result bgimg <?php echo $resultArr[$result]; ?>"></div>
			</div>
		</div>
		<div class="btn onceAgain bgimg" id="onceAgain" data-action = "2"></div>
		<?php if($result == 1) { ?>
			<div class="btn show bgimg" id="show" data-action = "2"></div>
		<?php } ?>
	</section>
</div>

<div class="mask" id="mask">
	<div class="share-gif bgimg"></div>
	<div class="picTxt">
		<div class="arrow-share bgimg fr"></div>
		<div class="txt">
			<p>请点击右上角 "..."</p>
			<p>分享给小伙伴看</p>
		</div>
	</div>
</div>
<script src="/js/common/jquery-1.12.0.js"></script>
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script src="/js/share.js"></script>
<script src="/js/plugins/getParams.js"></script>
<script src="/js/mobile/result.js"></script>
<script src="<?php echo $url; ?>/js/back.js"></script>
<script>
	var GLOBAL = {};
	$(function() {
		var img_url = '<?php echo $teamInfo['team_image']; ?>';
		var win_team_name = '<?php echo $teamInfo['team_name']; ?>';
		var fail_team_name = '<?php echo $oppteam_name; ?>';
		var total = '<?php echo $teamScore; ?>';
		var private = '<?php echo $total; ?>';
		var wx_name = '<?php echo $wx_name; ?>';
		GLOBAL.signature_url= '<?php echo $signature_url; ?>';
		GLOBAL.appid= '<?php echo $appid; ?>';

		//meet_id=2053&sequence=f69903d5300ccd0bc04baf56cb2f3c5f&comp_id=b68ae5e65b948c1b051f56a087620898&openid=oe13EuDk-6sm_Yfwk0rM2aSb9q_U&team=_L&round=9&team_img=/img/red.png&team_name=红队
		GLOBAL.params = "team_img="+img_url+"=&total="+total+"&private="+private+"&win_team_name="+win_team_name+"&fail_team_name="+fail_team_name+"&name="+wx_name;
		var obj = new sharewx();
		obj.init();
		// window.location.href = "/tug/runtime/share?" + encodeURI(params);
	})
</script>
<script>
	$(function() {
		Back({
			url:'<?php echo $url; ?>',
			meet_id:'<?php echo $_GET['meet_id']; ?>',
			openid:'<?php echo $_GET['openid']; ?>',
			"z-index":"90",
			width: "80px",
			height: "80px",
			"font-size":'1.2em',
			"line-height": "40px"
		});
	})
</script>
</body>
</html>